import request from '@/config/axios'

// 获取可用测试任务列表（需携带当前登录用户 id）
export const getExamTasks = async (userId: number) => {
  return await request.post({ url: '/system/exam/tasks?userId=' + userId})
}

export const examUserCheckConsent = async (userId: number,jobId: number) => {
  return await request.get({ url: '/system/examUser/checkConsent?userId=' + userId + "&jobId="+ jobId})
}

export const checkFilled = async (userId: number) => {
  return await request.get({ url: '/system/userProfile/checkFilled?userId=' + userId})
}

export const userProfileSave = async (data: any) => {
  return await request.post({ url: '/system/userProfile/save',data})
}

export const examUserSubmitConsent = async (userId: number,jobId: number) => {
  console.log(userId)
  console.log(jobId)
  return await request.post({ url: '/system/examUser/submitConsent?userId=' + userId + "&jobId="+ jobId})
}

export const examStart = async (params:any) => {
  return await request.post({ url: '/system/exam/start',params })
}

export const examubmitAndNext = async (params:any) => {
  return await request.post({ url: '/system/exam/submitAndNext',params})
}






